[RFQ] Add maxRetrySeconds configuration and RetryTooLong exception #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RFQ: Add maxRetrySeconds configuration and RetryTooLong exception
Summary
This PR implements the
maxRetrySeconds
configuration parameter andRetryTooLong
exception to limit retry wait times for the Zscaler SDK, addressing ticket SZ-1.Changes Made
1. Configuration (
zscaler/config/config_setter.py
)maxRetrySeconds
parameter to therateLimit
configuration section0
(meaning unlimited retry time)_DEFAULT_CONFIG
and_apply_default_values
method2. Exception Class (
zscaler/exceptions/exceptions.py
)RetryTooLong
exception classretry_seconds
andmax_seconds
properties3. Request Executor (
zscaler/request_executor.py
)maxRetrySeconds >= 0
fire_request_helper
method to check backoff time against limitRetryTooLong
exceptionmaxRetrySeconds > 0
(0 means unlimited)4. Module Exports (
zscaler/__init__.py
)RetryTooLong
exception for easy importUsage Example
Testing
poetry build
Implementation Details
maxRetrySeconds > 0
Jira Ticket: SZ-1
Link to Devin run: https://app.devin.ai/sessions/d0e3dce18ac34f3badb1e989d3d98256
Requested by: Samir Chaudhry (samir@cognition.ai)